{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style>
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0;
        margin-top: 0
    }

    #title span {
        float: right;
    }

    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
    .th{
        background: deepskyblue;
        color: #fff;
    }
    .lab{

    }
    .lab.recharge{
        color: darkred;
    }
    .val{
        font-weight: bold;
        font-size: 20px;
    }
    .trbg{
        background: seagreen;
        color: #fff;
    }
    .example table{
        display: flex;
    }
    .example tbody{
        width: 100%;
    }
    .recharge_vip{
        color: green;
    }
    .recharge_flag{
        color: orangered;
    }
    .recharge_count{
        color: blueviolet;
    }
    .bold{
        font-weight: bold;
    }
    .text-red{
        color: red;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar">
                        <form method="get" action="" style="display: flex;">
                            <div class="pull-left search" style="display: flex;">
                                <input name="date" type="text" id="time" class="form-control layui-input" value="{present name='time'}{$time}{/present}" placeholder="时间" autocomplete="off" style="height:34px;width:180px;margin:0 10px;">
                                <div class="pull-right search">
                                    <button style="border-radius:0px; border:1px solid #e5e6e7;"
                                            class="btn btn-default btn-outline" type="submit">查询
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="example">
                        <form class="form-horizontal">
                            <table data-toggle="table">
                            	{if condition="$data"}
                                <tbody id="form">
                                    <tr class="class">
                                        <td class="th" align="center" colspan="8">收支统计
                                        </td>
                                    </tr>
                                    <tr class="class">
                                        <td width="12.5%" class="lab recharge_vip bold text-red">余额充值-金额总额(元):
                                        </td>
                                        <td width="12.5%" class="val">{$data['total_recharge_money']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">余额充值-金币总额:
                                        </td>
                                        <td width="12.5%" class="val">{$data['total_recharge_volley']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">余额充值分成收益(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['recharge_profit_score']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip bold text-red">贵族充值总额(元):
                                        </td>
                                        <td width="12.5%" class="val">{$data['total_recharge_vip_money']}
                                        </td>
                                    </tr>
                                    <tr class="class">
                                        <td width="12.5%" class="lab recharge_vip">用户的直接收益(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['direct_profit_score']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">用户的一级收益(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['level_1_profit_score']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">用户的二级收益(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['level_2_profit_score']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">用户的三级收益(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['level_3_profit_score']}
                                        </td>
                                    </tr>
                                    <tr class="class">
                                        <td width="12.5%" class="lab recharge_vip">用户总提现积分(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['total_withdrawal_score']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">提现产生的总手续费(积分):
                                        </td>
                                        <td width="12.5%" class="val">{$data['withdrawal_fee_score']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip bold text-red">提现总额(元):
                                        </td>
                                        <td width="12.5%" colspan="3" class="val">{$data['total_withdrawal_money']}
                                        </td>
                                    </tr>
                                    <tr class="class">
                                        <td width="12.5%" class="lab recharge_vip">赠送用户的金币:
                                        </td>
                                        <td width="12.5%" class="val">{$data['gift_volley']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip">赠送用户的积分:
                                        </td>
                                        <td width="12.5%" colspan="5" class="val">{$data['gift_score']}
                                        </td>
                                    </tr>
                                    <tr class="class">
                                        <td width="12.5%" class="lab recharge_vip bold text-red">Flag激励金-金额总额(元):
                                        </td>
                                        <td width="12.5%" colspan="1" class="val">{$data['flags']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip bold text-red">系统总剩余金币:
                                        </td>
                                        <td width="12.5%" colspan="2" class="val">{$data['user_volley_all']}
                                        </td>
                                        <td width="12.5%" class="lab recharge_vip bold text-red">系统总剩余积分:
                                        </td>
                                        <td width="12.5%" colspan="2" class="val">{$data['user_score_all']}
                                        </td>
                                    </tr>
                                    <tr class="class">
                                        {php}
                                        $totalLirun = $data['total_recharge_vip_money']+$data['total_recharge_money']+$data['flags'] - $data['total_withdrawal_money'];
                                        $totalIncome = $data['total_recharge_vip_money']+$data['total_recharge_money']+$data['flags'];
                                        $totalIncome = $totalIncome ?: 1;
                                        {/php}
                                        <td width="12.5%" colspan="2" class="lab recharge_vip bold text-red">本月利润（余额充值+贵族充值+Flag激励金-提现总额）:
                                        </td>
                                        <td width="12.5%" colspan="2" class="val">{$totalLirun}
                                        </td>
                                        <td width="12.5%" colspan="2" class="lab recharge_vip bold text-red">本月利润率:
                                        </td>
                                        <td width="12.5%" colspan="2" class="val">{$totalLirun / $totalIncome * 100} %
                                        </td>
                                    </tr>
                                </tbody>
                                {/if}
                            </table>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}

<script type="text/javascript">

    layui.use(['laydate'], function(){
        var laydate = layui.laydate;

        laydate.render({
            elem: '#time' //指定元素
            ,type: 'month'
            ,trigger: 'click'
        });
    })

</script>
 